package example.tallydemo.MyActivity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import example.tallydemo.R;

public class ShowDetailActivity extends AppCompatActivity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show_detail);
        show(getIntent());
    }

    public void show(Intent data)
    {
        ((TextView)findViewById(R.id.id_detail_type)).setText(data.getStringExtra("type"));
        ((TextView)findViewById(R.id.id_detail_origin)).setText(data.getStringExtra("origin"));
        ((TextView)findViewById(R.id.id_detail_classify)).setText(data.getStringExtra("classify"));
        ((TextView)findViewById(R.id.id_detail_money)).setText(data.getStringExtra("money"));
        ((TextView)findViewById(R.id.id_detail_time)).setText(data.getStringExtra("date"));
        ((TextView)findViewById(R.id.id_detail_introduction)).setText(data.getStringExtra("introduction"));
    }

    public void onBack(View view)
    {
        super.onBackPressed();
    }

}
